Optimal. Leaf size=35 \[ \frac {d x}{a}-\frac {(c-d) \cos (e+f x)}{f (a+a \sin (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2814, 2727}
\begin {gather*} \frac {d x}{a}-\frac {(c-d) \cos (e+f x)}{f (a \sin (e+f x)+a)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2814
Rubi steps
\begin {align*} \int \frac {c+d \sin (e+f x)}{a+a \sin (e+f x)} \, dx &=\frac {d x}{a}-(-c+d) \int \frac {1}{a+a \sin (e+f x)} \, dx\\ &=\frac {d x}{a}-\frac {(c-d) \cos (e+f x)}{f (a+a \sin (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(79\) vs. \(2(35)=70\).
time = 0.11, size = 79, normalized size = 2.26 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (d (e+f x) \cos \left (\frac {1}{2} (e+f x)\right )+(2 c+d (-2+e+f x)) \sin \left (\frac {1}{2} (e+f x)\right )\right )}{a f (1+\sin (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.25, size = 42, normalized size = 1.20
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (c -d \right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}+2 d \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}\) | \(42\) |
default | \(\frac {-\frac {2 \left (c -d \right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}+2 d \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}\) | \(42\) |
risch | \(\frac {d x}{a}-\frac {2 c}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {2 d}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}\) | \(54\) |
norman | \(\frac {\frac {d x}{a}+\frac {d x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a}+\frac {d x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {d x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {\left (2 c -2 d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {\left (2 c -2 d \right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}\) | \(134\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 84 vs.
\(2 (37) = 74\).
time = 0.49, size = 84, normalized size = 2.40 \begin {gather*} \frac {2 \, {\left (d {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} - \frac {c}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 70, normalized size = 2.00 \begin {gather*} \frac {d f x + {\left (d f x - c + d\right )} \cos \left (f x + e\right ) + {\left (d f x + c - d\right )} \sin \left (f x + e\right ) - c + d}{a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 109 vs.
\(2 (26) = 52\).
time = 0.63, size = 109, normalized size = 3.11 \begin {gather*} \begin {cases} - \frac {2 c}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} + \frac {d f x \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} + \frac {d f x}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} + \frac {2 d}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} & \text {for}\: f \neq 0 \\\frac {x \left (c + d \sin {\left (e \right )}\right )}{a \sin {\left (e \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.55, size = 40, normalized size = 1.14 \begin {gather*} \frac {\frac {{\left (f x + e\right )} d}{a} - \frac {2 \, {\left (c - d\right )}}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.83, size = 35, normalized size = 1.00 \begin {gather*} \frac {d\,x}{a}-\frac {2\,c-2\,d}{a\,f\,\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________